//
// Created by xili on 2024/8/22 15:02.
// GO BIG OR GO HOME.
//
#include "leetcode.h"

class Solution {
public:
    int subsetXORSum(vector<int>& nums) {
        int res = 0;
        int n = nums.size();
        for (auto num: nums){
            res |= num;
        }
        return res << (n - 1);
    }
};